import { request } from '@umijs/max';
import { BaseResponse, DashboardStatsVO } from './types';

/**
 * 获取仪表盘统计数据
 */
export async function getDashboardStats(options?: { [key: string]: any }) {
  return request<BaseResponse<DashboardStatsVO>>('/api/admin/dashboard/stats', {
    method: 'GET',
    ...(options || {}),
  });
}

// 获取最近交易记录
export async function getRecentTransactions(options?: { [key: string]: any }) {
  return request('/api/admin/dashboard/recent-trades', {
    method: 'GET',
    ...(options || {}),
  });
} 